﻿using System;

namespace Progream25
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(GetSum(8,9)) ;
            Console.WriteLine(GetSum(8, 9,1,4,55,100));

            Test("小白", "666神级", 666, 666);

            GetScore("小白", 2020, 90, 100, 20,40);
        }
        public static int GetSum(params int[]n)
        {
            var sum = 0;
            for(var  i=0;i<n.Length;i++)
            {
                sum += n[i];
            }
            return sum;
        }
        public static void Test(params object[] objs)
        {
            Console.WriteLine(objs[0]);
            Console.WriteLine(objs[1]);
            Console.WriteLine(objs[2]);
            Console.WriteLine(objs[3]);

        }
        public static void GetScore(string name,int id,params int[]scores)
        {
            Console.WriteLine("学号:" + id);
            Console.WriteLine("姓名:" + name);
            var sum = 0;
            for(var i=0;i<scores.Length;i++)
            {
                sum += scores[i];
            }
            Console.WriteLine("总分:" + sum);
            Console.WriteLine("平均分：" + sum / scores.Length);
        }
    }
}
